Method and apparatus for managing defects in recording media, a computer readable medium including computer readable code for the same, and a defect managed recording medium obtained using the same method, apparatus, and computer readable medium

ABSTRACT

A method, apparatus and computer readable medium for managing recording medium defects and a defect managed recording medium. The recording medium includes a spare area in which a replacement area, which is a substitute for a defective area of the recording medium, is formed, and a temporary defect management area in which temporary management information that specifies the defective area and the corresponding replacement area is recorded, wherein position information and state information regarding the defective area are recorded in the replacement area. Accordingly, it is possible to restore defect information even if recording medium defect management on the recording medium ended abnormally.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.10/799,599, filed Mar. 15, 2004, now pending, which claims the benefitof Korean Patent Application Nos. 2003-28040 and 2003-30950, filed onMay 1, 2003, and May 15, 2003, respectively, in the Korean IntellectualProperty Office, and U.S. Patent Provisional Application No. 60/472,121filed on May 21, 2003, the disclosures of which are incorporated hereinin their entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to defect management for recording media,and more particularly, to a method, apparatus, and computer readablemedium for performing management of defects of a recording medium evenwhen defect management of the recording medium is abnormally terminated,and a defect managed recording medium obtained using the same method,apparatus, and computer readable medium.

2. Description of the Related Art

Defect management includes a process of rewriting data stored in adefective area of a user data area of a recording medium in a newportion of the user data area, thereby compensating for data loss causedby the defective area. In general, defect management is performed usinglinear replacement or slipping replacement. In linear replacement, datastored in the defective area of the user data area is recorded in aspare data area having no defects. In slipping replacement, thedefective area of the user data area is skipped and the next availablearea of the user data area having no defects is used.

Both linear replacement and slipping replacement are, however,applicable only to recording media such as a DVD-RAM/RW discs, on whichdata can be repeatedly written and recording can be performed using arandom access method. It is difficult to perform linear replacement andslipping replacement on write once recording media, where recording isallowed only once. In general, the presence of defects in a recordingmedium is detected by recording data on the recording medium and thenconfirming whether or not data has been written correctly on therecording medium. However, once data is written on a write oncerecording medium, it is impossible to thereafter overwrite new data andmanage defects on the write once recording medium.

Other methods, apparatuses, and computer readable media for managingdefects on write once recording media, where written data cannot beerased or rewritten, include the methods, apparatuses, and mediapotentially including the use of a reproducing and/or recording mediumdrive, to produce a defect managed write once recording medium.

However, the defect management performed by a reproducing and/orrecording medium drive can be abnormally discontinued due to anunavoidable accident, e.g., when power supplied to the reproducingand/or recording medium drive is interrupted due to a power failure.Therefore, an apparatus, method, and computer readable medium has beendeveloped and described herein to generate a resultant defect managedrecording medium regardless of such interruptions.

SUMMARY OF THE INVENTION

The present invention provides a method, apparatus, and computerreadable medium for performing defect management on a recording mediumwhere defect management was abnormally terminated due at least to anunavoidable accident such as a power failure, and a defect managed writeonce disc implementing compensation for the same.

Additional aspects and/or advantages of the invention will be set forthin part in the description which follows and, in part, will be obviousfrom the description, or may be learned by practice of the invention.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide a recording medium, including a sparearea storing a replacement area that is a substitute for a defectivearea of the recording medium, and a temporary defect management areastoring temporary management information identifying the defective areaand the replacement area, wherein position information and stateinformation regarding the defective area are recorded in the replacementarea.

The position information and state information regarding the defectivearea may be error-correction code (ECC) encoded during ECC encoding ofdata recorded in the replacement area. Alternatively, ECC encoded dataand the position information and state information are recorded in thereplacement area.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide a method of managing a defect in arecording medium, including recording a replacement area for a defectivearea of the recording medium in a spare area, and recording temporarymanagement information identifying the defective area and thecorresponding replacement area in a temporary defect management area ofthe recording medium, wherein position information and state informationregarding the defective area are recorded in the replacement area.

The method may further include recording temporary managementinformation, which is lastly recorded in the temporary defect managementarea, in a defect management area (DMA) during a finalizing of therecording medium. The lastly recorded temporary management informationmay be recorded in the DMA in at least one of a lead-in area and alead-out area of the recording medium.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide an apparatus, including arecording/reading unit recording data to and/or from a recording medium,and a controller controlling the recording of data to a replacementarea, for a defective area of the recording medium, in a spare area ofthe recording medium, the recording/reading unit to record temporarymanagement information identifying the defective area and thereplacement area in a temporary defect management area, and controllingthe recording/reading unit to record position information and stateinformation regarding the defective area in the replacement area.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide a method of managing a defect in arecording medium, including determining whether recording medium defectmanagement has been successfully completed, reading lastly recordeddefect information from a replacement area, of the recording medium, fora defective area of the recording medium, and creating new defectinformation when the recording medium defect management is determined tohave not been successfully completed, and updating defect managementinformation in a defect management area (DMA) of the recording mediumbased on the generated defect information.

The determining of whether the recording medium defect management wassuccessfully completed may be determined by checking a consistency flagon the recording medium.

The generating of the new defect information may further include readingposition information regarding the defective area from the replacementarea. The generating of the new defect information may further includegenerating new defect information based on previous defect informationand the read defect information.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide a method of managing a defect in arecording medium, including determining whether recording medium defectmanagement has been previously successfully completed, scanning aportion of the recording medium purportedly containing no recorded data,as identified in a spare bit map (SBM), and verifying whether theportion contains no recorded data, and updating the SBM to preciselyreflect a recording state of the recording medium based on theverification of the portion of the recording medium.

The updating of the SBM may further include recording an updated SBM astemporary management information in a temporary defect management areaon the recording medium.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide an apparatus, including arecording/reading unit recording data to and/or from a recording medium,and a controller determining whether recording medium defect managementhas previously been successfully completed, controlling therecording/reading unit to record lastly recorded defect information froma replacement area and generate new defect information when therecording medium defect management is determined to not have previouslybeen successfully completed, and controlling the recording/reading unitto update a defect management area (DMA) of the recording medium, basedon the generated defect information.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide an apparatus, including a pickuprecording data to and/or from a recording medium, and a controllercontrolling the pickup to record and/or read data to determine whetherrecording medium defect management has previously been successfullycompleted, and scanning a portion of the recording medium purportedlycontaining no recorded data, as identified in a lastly recorded sparebit map (SBM) on the recording medium, in order to verify whether datais recorded in the portion when the recording medium defect managementis determined to not have previously been successfully completed, andupdating the SBM to precisely reflect the recording state of therecording medium based on the verification of the portion of therecording medium.

The controller may control the recording of the updated SBM as temporarymanagement information in a temporary defect management area of therecording medium.

To accomplish the above and/or other aspects and advantages, embodimentsof the present invention provide a computer-readable medium includingcomputer readable code for controlling a reproducing and/or recordingapparatus to perform any of the above methods.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and/or other aspects and advantages of the present inventionwill become more readily appreciated from the following description ofthe embodiments taken in conjunction with the accompanying drawings inwhich:

FIGS. 1A and 1B illustrate data structures of a write once recordingmedium with a temporary defect management area (TDMA) and a defectmanagement area, according to reproducing and/or recording embodimentsof the present invention;

FIG. 2 is a block diagram of an apparatus for performing defectmanagement of a recording medium, according to an embodiment of thepresent invention;

FIG. 3 is a block diagram of a reproducing and/or recording medium drivethat includes the reproducing and/or recording apparatus of FIG. 2,according to an embodiment of the present invention;

FIG. 4 illustrates a data frame format for a recording medium, accordingto an embodiment of the present invention;

FIG. 5 illustrates a spare area in the recording medium formed whendefect management of the recording medium is abnormally terminated dueto an unavoidable accident such as a power failure;

FIGS. 6A-6C illustrate diagrams explaining a method of restoring a sparebit map (SBM), which is a type of temporary management information,according to another embodiment of the present invention; and

FIG. 7 is a flowchart illustrating a recording medium defect managementmethod, according to another embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Reference will now be made in detail to the embodiments of the presentinvention, examples of which are illustrated in the accompanyingdrawings, wherein like reference numerals refer to the like elementsthroughout. The embodiments are described below to explain the presentinvention by referring to the figures. Hereinafter, preferredembodiments of the present invention will be described with reference tothe accompanying drawings.

FIGS. 1A and 1B illustrate structures of a recording medium 100,according to embodiments of the present invention.

FIG. 1A illustrates a single recording layer recording mediumrepresentation of the recording medium 100 having a recording layer L0.The recording medium 100 includes a lead-in area, a data area, and alead-out area. The lead-in area is located in an inner part of therecording medium 100 and the lead-out area is located in an outer partof the recording medium 100. The data area is present between thelead-in area and the lead-out area. In this embodiment, the start andend of the data area are the same as those of a CD rewritable (CD RW),and the data area is sequentially divided into a spare area, a user dataarea, and a spare area, starting from the inner part of the recordingmedium 100. The user data area is an area where user data is written,and the spare areas serve to compensate for loss in the recording spaceof the user data area due to defects. Since defects may occur on therecording medium 100, it is preferable that the sizes of the spare areasbe allocated such that a large amount of data can still be written onthe recording medium 100. In this embodiment, positions of the spareareas are not fixed. At least one of a defect management area and atemporary defect management area is present in at least one of thelead-in area and the lead-out area.

FIG. 1B illustrates a double recording layer recording mediumrepresentation of the recording medium 100, having two recording layersL0 and L1. A lead-in area, a data area, and an outer area aresequentially formed from the inner part of the first recording layer L0to its outer part of first recording layer L0. Similarly, an outer area,a data area, and a lead-out area are sequentially formed from the outerpart of the second recording layer L1 to the inner part of the secondrecording layer L1. Unlike the single recording layer recording mediumof FIG. 1A, the lead-out area is present in the inner part of therecording medium 100 of FIG. 1B. That is, the recording medium 100 ofFIG. 1B has an opposite track path (OTP) where data is written startingfrom the lead-in area of the first recording layer L0 toward the outerarea of the first recording layer and continuing from the outer area ofthe second recording layer L1 to its lead-out area of the secondrecording layer L1. The spare area is allocated to each of the recordinglayers L0 and L1.

In these embodiments, the spare areas can be present between the lead-inarea and the user data area, between the user data area and the lead-outarea and between the user data area and the outer areas. If necessary, aportion of the user data area may be used as another spare area, thatis, more than one spare area may be present between the lead-in area andthe lead-out area.

FIG. 2 is a block diagram of a reproducing and/or recording apparatusfor performing recording medium defect management, according to anembodiment of the present invention. Referring to FIG. 2, the recordingapparatus includes a recording/reading unit 1, a controller 2, and amemory 3. The recording/reading unit 1 writes data on a recording medium100 according to an embodiment of the present invention, and reads backthe data from the recording medium 100 to verify the written data.

The controller 2 performs recording medium defect management accordingto an embodiment of the present invention. In this embodiment, thecontroller 2 uses a verify-after-write method in which data is writtenon the recording medium 100 in predetermined units of data and thewritten data is then verified to detect if an area of the recordingmedium 100 has a defect. More specifically, the controller 2 writes userdata on the recording medium 100 in predetermined units of data,verifies the written user data to detect an area of the recording medium100 in which a defect exists, and replaces a detected defective areawith a replacement area. Thereafter, the controller 2 createsinformation identifying both positions of the defective area and thereplacement area, and stores the created information in the memory 3. Ifthe amount of the stored information reaches a predetermined level, thecontroller 2 writes the stored information in a temporary defectmanagement area (TDMA) of the recording medium 100. Information writtento the TDMA is called temporary management information, corresponding todefect management information written to a defect management area (DMA).The temporary management information contains temporary defectinformation identifying the defective areas and correspondingreplacement areas, and temporary defect management information formanaging the temporary defect information. In particular, in thisembodiment, the temporary defect management information includes a spacebit map (SBM) that provides information for identifying available areasfrom unavailable areas of the recording medium 100.

The information regarding the defective area is written to thereplacement area, so as to restore this information when temporarymanagement information cannot be updated, e.g., when an unavoidableaccident such as a power failure occurs, even though the defective areahas been replaced with the replacement area. The information regardingthe defective area specifies the position and state of the defectivearea. For instance, information initially designated for a defectivecluster is written to a new cluster, i.e., a replacement cluster, thatis a substitute for the defective cluster. The information regarding thedefective cluster, in the replacement cluster, identifies the positionand state of the defective cluster. Recording medium defects includedefects caused during recording of data and defects caused duringverification of the written data. The position information regarding thedefective cluster is considered address information. For instance, ifseveral continuous physical sector numbers (PSNs) are initiallydesignated for the defective cluster, a first PSN of the defectivecluster is recorded as the position information thereof. The size of theposition information is a unit of bytes, so that all addresses of therecording medium 100 can be expressed as the position information. Forinstance, the position information may be about 4 bytes long. The stateinformation regarding the defective cluster identifies whether user datawritten in the defective cluster is equivalent to user data written in areplacement cluster, or identifies whether the defect is a completedefect or an incomplete defect. The complete defect represents data thatis completely damaged and cannot be corrected, and thus cannot be readout, whereas the incomplete defect represents data that has beencorrected but is more likely to be damaged again. If the defect is acomplete defect, data written in the replacement cluster may not be thesame as data written in the defective cluster. This is because data,which should have been written in the defective cluster, compared to thedata that actually ends up being written in the defective cluster, maybe written in the replacement cluster when a complete defect occursduring recording of data that smoothly changes, such as video data.

When a user presses an eject button (not shown) of the reproducingand/or recording apparatus to remove the recording medium 100, afterrecording of data, the controller 2 expects write operations to havebeen terminated. Next, the controller 2 reads the defect informationfrom the memory 3, provides it to the recording/reading unit 1, andcontrols the recording/reading unit 1 to write that defect informationto the recording medium 100. The temporary management information isupdated for every write operation. Alternatively, the temporarymanagement information can be updated whenever recording is completed ina predetermined recording unit.

Also, the controller 2 sets a consistency flag when recording thetemporary management information in the TDMA, in order to restore thetemporary management information when the temporary managementinformation is not updated due to an unavoidable accident such as apower failure, even though the defect area has been replaced with thereplacement area. The consistency flag identifies the start of anupdating of the temporary management information. For example, in thiscase, the consistency flag may be set to 1. When the recording medium100 needs to be removed from a recording medium drive after recordingdata in predetermined units or after a write operation, the consistencyflag may be reset to 0 so as to represent a successful updating of thetemporary management information, while the temporary managementinformation is finally updated.

When recording in the next recording unit starts or the recording medium100 is reloaded, the controller 2 checks the consistency flag. If theconsistency flag is 1, the controller 2 determines that the recordingwas abnormally terminated and starts restoration of the temporarymanagement information and other additional information. That is, thecontroller 2 reads information regarding the defective area from a mostrecently replaced area, and updates the temporary management informationand other additional information based on the read information. Adetailed description thereof will be provided later.

When the recording of data is complete, i.e., when additional data willnot be written to the recording medium 100 (the recording medium 100needs to be finalized), the controller 2 controls the recording/readingunit 1 to record the most recently updated temporary managementinformation in the Disc Management Area (DMA) of the recording medium100.

The information regarding a defective area is also written in areplacement area when a defect occurs during reproduction of data. Forinstance, the position information, e.g., a first PSN of a defectivecluster and state information regarding the defective are also writtenin a replacement cluster.

FIG. 3 is a block diagram illustrating the structure of a recordingmedium drive included in the reproducing and/or recording apparatus ofFIG. 2. Referring to FIG. 3, the recording medium drive includes apickup 10, and corresponds to the recording/reading unit 1 of FIG. 2. Arecording medium 100 is loaded onto the pickup 10. Similarly, therecording drive includes a controller 2 that has a PC I/F 21, a digitalsignal processor (DSP) 22, a radio-frequency (RF) amplifier 23, a servo24, and a system controller 25. The memory 3, of FIG. 2, can be includedin the system controller 25 of the controller 2.

During a write operation, the PC I/F 21 receives data to be written anda write command from a host (not shown). The system controller 25performs an initialization of the recording medium, required for thewrite operation. The DSP 22 performs the error correcting code (ECC)encoding on the data transmitted from the PC I/F 21 by adding additionaldata, such as data parity to the data, and modulates the ECC encodeddata in a predetermined data format. The RF amplifier 23 converts thedata output from the DSP 22 into an RF signal. The pickup 10 then writesto the recording medium 100 using the RF signal output from the RFamplifier 23. Accordingly, the servo 24 receives a servo control commandfrom the system controller 25 and performs servo control with respect tothe pickup 10. The system controller 25 also instructs the pickup 10 toread data from the recording medium 100 or to record information, suchas temporary management information, to the recording medium 100.

More specifically, the system controller 25 writes data to the recordingmedium 100 in predetermined numbers of clusters and verifies the datawritten to the clusters. If a defect is detected in a cluster, theposition information regarding the defective cluster and the stateinformation regarding the defect are stored in the memory 3. When thedata verification is complete or the defect is detected, the systemcontroller 25 receives user data from the memory 3 containing the writecommand and user data transmitted from the host. The user data specifiesthe position of the defective cluster. Then, the system controller 25incorporates the position information regarding the defective clusterand the state information regarding the defect into the user data andwrites the user data to the replacement cluster.

During a reproduction operation, the PC I/F 21 receives a read commandfrom the host. The system controller 25 performs initialization of therecording medium 100, required for the read operation. The pickup 10outputs a laser beam to the recording medium 100 and obtains and outputsa reflected optical signal, from the laser beam reflected from therecording medium 100. The RF amplifier 23 converts the optical signaloutput from the pickup 10 into an RF signal, provides data modulatedfrom the RF signal to the DSP 22, and provides a servo signal, for servocontrol, obtained from the RF signal to the servo 24. The DSP 22demodulates the modulated data, performs ECC decoding on the demodulateddata, and outputs the ECC decoded data. The servo 24 performs servocontrol on the pickup 10, in response to the servo signal output fromthe RF amplifier 23 and the servo control command output from the systemcontroller 25. The PC I/F 21 then sends the data received from the DSP 2to the host. Also, the system controller 25 may instruct the pickup 10to read defect management information from the recording medium 100during the read operation.

More specifically, if an incomplete defect is detected during a readoperation, in response to a read command given from the host, and if thesystem controller 25 determines there is sufficient time to make areplacement for the incomplete defect after the read operation or evenduring the read operation, the system controller 25 can reproduce theuser data initially designated for the defective cluster containing theincomplete defect, by adding information regarding the defective clusterinto the user data and writing the user data in a replacement cluster.The user data previously written in the defective cluster and theinformation regarding the defective cluster may be ECC encoded andwritten in the replacement cluster. Otherwise, only the user data is ECCencoded and written together with the information regarding thedefective cluster in the replacement cluster.

Examples of methods of restoring data written in a defective cluster areas follows:

U.S. Pat. No. 6,367,049 illustrates a method of recording data in an ECCformat with an ECC cluster consisting of 304 long distance Reed-SolomonECCs, and a burst indicator subcode (BIS) cluster consisting of 24 BISs.During the making of the BIS cluster, a portion of control data may beallocated as a field to which information regarding defective clustersis written.

More specifically, in the recording of data in such an ECC format, whena defect is detected during a verifying process after the initialrecording, user data previously written in the defective clustercontaining the defect is read from a memory, in response to a writecommand given from a host, and is encoded into an ECC cluster. Next,control data with a physical address of the defective cluster is encodedinto a BIS cluster in a portion of the control data, so as to make aphysical cluster. Here, the portion of the control data is used as afield in which 16 physical addresses of a replacement cluster andinformation regarding the position and state of the defective clusterare recorded. Next, the physical cluster is written in a replacementcluster.

U.S. Pat. No. 6,367,049 illustrates a method of recording in an ECCformat when an incomplete defect is detected, during a read operation,in response to a read command given from a host, i.e., a defectivecluster containing the defect can be replaced with a replacementcluster. Thus, in view of the embodiments of the present invention, andupon application to the data structure illustrated in U.S. Pat. No.6,367,049, a defective cluster can be reproduced and errors in an ECCcluster and a BIS cluster are corrected so as to obtain user data. Next,the user data can be encoded into an ECC cluster. Then, control datawith a physical address and state information of the defective clusterare encoded into a BIS cluster, in a portion of control data, therebyobtaining a physical cluster. Here, the portion of the control data isused as a field in which 16 addresses of the replacement cluster andinformation regarding the position and state of the defective clusterare recorded. Next, the physical cluster can be written in thereplacement cluster.

It is also possible to perform recording medium defect management on aDVD-RAM using a recording medium drive. Data can be written in an ECCformat using Reed_Solomon product codes (RSPCs) (see the data format ofa DVD-RAM specification). Therefore, the present invention is similarlyapplicable to information storage media such as DVD-RAM and DVDs onwhich information can be recorded using RSPCs.

Information regarding the position and state of a defective cluster canalso be stored in a linking area between recording units of a recordingmedium when a defective cluster is replaced with a replacement cluster.To increase the reliability of recorded data, the position and stateinformation regarding the defective cluster can preferably be written inan error correction structure in the linking area so that an error inthe information can be easily corrected.

Hereinafter, a method of restoring temporary management informationwritten to a temporary defect management area (TDMA) will be described.

FIG. 5 illustrates a recording medium spare area formed when recordingmedium defect management is abnormally terminated, e.g., due to anunavoidable accident such as a power failure. Referring to FIG. 5,replacement clusters, which are substitutes for defective clusters, arewritten to a spare area. In general, replacements for defects aresequentially formed in the spare area, starting from a portion thereofwith the smallest PSN. If necessary, replacements can be sequentiallyformed starting from a portion of the spare area with the largest PSN.The replacement clusters are divided into two types of clusters:clusters whose information is updated with temporary managementinformation (TDMS) and clusters whose information has not been updated.Here, the updating of the replacement cluster information indicates thatrecording medium defect management was successfully completed.Replacement clusters whose information has not been updated representsthat recording medium defect management was abnormally terminated,requiring data written in the defective clusters have to be restored.

FIG. 6 illustrates diagrams explaining a method of updating a spare bitmap (SBM) which is a type of temporary management information. Indetail, FIG. 6A illustrates a recording medium recording state beingdescribed in an SBM of a recording medium 100, where recording mediumdefect management was abnormally terminated and restoration of datawritten in defective clusters is required, and FIG. 6B illustrates theactual recording state of the recording medium 100. Here, blackrectangles denote portions of the recording medium 100 that containdata, gray rectangles denote portions of the recording medium 100 thatactually contain data but are indicated not to include the data in theSBM, and white rectangles denote portions of the recording medium 100that contain no data. If the recording medium defect managementabnormally ends, the SBM will not reflect updated recordingappropriately.

When the recording medium 100 is inserted into a recording medium drive,the recording medium drive checks a consistency flag. If the consistencyflag is ‘1’, the recording medium drive determines that the recordingmedium 100 was removed from a recording medium drive withoutsuccessfully updating temporary management information written in a TDMAof the recording medium 100.

The recording medium drive scans a portion of the recording medium 100containing no data, indicated in the SBM, and checks whether data isactually written in that portion. In this way, the recording mediumdrive corrects the SBM to precisely reflect the recording state of therecording medium 100. As mentioned above, the SBM is a map thatspecifies a recording medium recording state with bit values, i.e., itindicates whether clusters, which are allocated to a physicallyrecordable area of the recording medium 100, contain data or not. Therecording medium drive scans all of clusters that are determined to haveno data, specified in the SBM, checks if these clusters actually do notcontain data, and makes a new SBM reflecting the checking result, i.e.,it updates the previous SBM. When the updated SBM is written astemporary management information in the TDMA, the updating of the SBM iscomplete.

FIG. 6C illustrates a recording state of the recording medium 100, within a new SBM that precisely indicates whether the clusters contain dataor not. The recording medium drive makes the new SBM by updating theprevious SBM with bit values.

FIG. 7 is a flowchart illustrating a recording medium defect managementmethod according to an embodiment of the present invention. Referring toFIG. 7, in operation 701, when a write once recording medium, on whichrecording medium defect management has never been performed, is loadedinto a recording medium drive (or reproducing and/or recordingapparatus), the recording medium drive reads temporary managementinformation from a TDMA, stores the read information in a memory, andperforms initialization of the recording medium, required for awrite/read operation. In operation 702, if the loaded recording mediumis not an empty recording medium, the recording medium drive reads aconsistency flag set value C_flag from temporary defect managementinformation recorded in the TDMA, and determines whether defectinformation regarding the write once recording medium was successfullyupdated. For example, if the consistency flag C_flag=1, the defectinformation was abnormally terminated, and if the consistency flagC_flag=0, the defect information was successfully completed. If it isdetermined in operation 702 that the defect information was notsuccessfully updated, temporary defect information contained in thetemporary management information recorded in the memory is read, theposition of a most recently formed replacement area is detected, datawritten in a next replacement cluster is reproduced, and informationregarding the position and state of a defective cluster is detected, inoperation 703. In operation 704, a defect list naming the defectivecluster and the replacement cluster is created based on the detectedposition and state information. In operation 705, new defect informationis created based on the created defect list and the previous temporarydefect information. In operation 706, the temporary defect managementarea TDMA is updated.

As noted above, U.S. Pat. No. 6,367,049 illustrates a method ofrecording data in an ECC format, in which a physical address of, andinformation regarding, a defective cluster are written in a replacementcluster during defect management. Thus, in view of embodiments of thepresent invention, and upon application to the data structureillustrated in U.S. Pat. No. 6,367,049, a most recently updatedreplacement cluster can be detected from a spare area of a recordingmedium, based on temporary defect information contained in defectmanagement information. Next, data written in replacement clusters nextto the detected replacement cluster is read. Next, an error in a BIScluster of a replaced physical cluster can be corrected. Next, defectlists naming defective clusters and replacement clusters can be createdby referring to the physical addresses and state information of thedefective clusters, specified in control data. Next, new temporarydefect information can be created based on the defect lists and finaltemporary defect information that was read and stored in a memory, whenloading the write once recording medium onto a recording medium drive.Also, if data to be contained in the temporary management informationexists and needs to be updated, the data is also updated and recorded astemporary management information in the TDMA. This embodiment isapplicable to both write once recording media and rewritable recordingmedia while changing particulars of data updating according to thecharacteristics of a recording medium used.

Similarly, to restore data contained in a defective cluster of a DVD,where data is written in an RSPC format, and the physical address andstate information of the defective cluster are written to a replacementblock, first, a most recently formed replacement block is detected froma spare area of the DVD, based on temporary defect information containedin the TDMA. Next, data written to a next block is read and reproducedand an error in the data is corrected. Next, information regarding thepositions and states of defective clusters written in a reserved areaRSV shown in FIG. 4 is obtained, and defect lists naming the defectiveclusters and replacement clusters are created based on the obtainedinformation. Next, new temporary defect information is created, based onthe defect lists and final temporary defect information, which is readand stored in a memory when loading the DVD onto a recording mediumdrive. If data to be contained in the temporary management informationexists and needs to be updated, the data is again updated and written astemporary management information in the TDMA. This method can beperformed on both write once recording media and rewritable recordingmedia while changing particulars of data updating, according to thecharacteristics of a recording medium used.

Further, to restore data written in defective clusters in a linking areacontaining information regarding the positions and states of thedefective clusters, a most recently updated replacement block can bedetected from a spare area of a recording medium, based on temporarydefect information contained in temporary management information. Next,data regarding replacement clusters allotted to the replacement block isread from the linking area to obtain information regarding the positionsand states of the defective clusters. Next, defect lists naming thedefective clusters and replacement clusters can be created based on theread information. Next, new temporary defect information is created,based on the defect lists and final temporary defect information, whichis temporary management information read and stored in a memory when therecording medium was loaded into a recording medium drive. Ifinformation to be added to the temporary management information existsand needs to be updated, the information is updated and written as thetemporary management information in a TDMA. This method can also beperformed on both write once recording media and rewritable recordingmedia while changing particulars of data updating, according to thecharacteristics of a recording medium used.

These above data restoration methods are applicable both to write oncerecording media and rewritable recording media. However, the write oncerecording media require a defect management area and a TDMA forrecording medium defect management, whereas the inclusion of the TDMAinto the rewritable recording media is optional. To be compatible withrewritable recording media, it is recommended that the defect managementarea in the write once recording media be equal to that of therewritable recording media, and most recently updated temporarymanagement information written in the TDMA be written in the defectmanagement area during recording medium finalization.

The defect management method described herein may be embodied as acomputer program that can be run by a computer. The program can bestored in a computer readable medium. When the program is read and runby a computer, the defect management is performed. Here, thecomputer-readable medium may be a magnetic recording medium, an opticalrecording medium, or a carrier wave, for example.

Thus, as described above, embodiments of the present invention provide amethod, apparatus, and computer readable medium for restoring temporarymanagement information, including; temporary defect informationcontained which is written to temporary defect management area (TDMA).

According to embodiments of the present invention, it is possible torestore defect information written to a defect management area of eachof rewritable recording media. For instance, although replacementclusters may have substituted for defective clusters, caused during awrite/read operation performed on a write once recording medium (or arewritable recording medium), a recording medium may be removed from arecording medium drive without successfully updating defect informationin a TDMA/defect management area, e.g., due to an unavoidable accidentsuch as a system power failure. Thus, even in this case, according toembodiments of the present invention, it is possible to restoretemporary defect information/defect information written to theTDMA/defect management area. It is also possible to restore a spare bitmap (SBM) that has not been updated.

In particular, the present invention can be advantageously applied to arecording medium drive, or reproducing and/or recording apparatuscapable of checking whether a system may have been improperly poweredoff. However, even if a recording medium drive cannot check whether asystem has been improperly powered off, the present invention enablesthe recording medium drive to perform a write operation and restorationof data, in response to a host command or when a recording medium isloaded into the recording medium drive.

Although a few embodiments of the present invention have been shown anddescribed, it would be appreciated by those skilled in the art thatchanges may be made in this embodiment without departing from theprinciples and spirit of the invention, the scope of which is defined inthe claims and their equivalents.

1. A method of managing a defect in a recording medium, comprising:recording data to a replacement area for a defective area of therecording medium in a spare area; and recording temporary managementinformation identifying the defective area and the correspondingreplacement area in a temporary defect management area of the recordingmedium, wherein position information regarding the defective area isrecorded in the replacement area.
 2. The method of claim 1, wherein thetemporary management information is recorded in the temporary defectmanagement area in at least one of a lead-in area and a lead-out area ofthe recording medium.
 3. The method of claim 1, further comprisingrecording temporary management information, which is lastly recorded inthe temporary defect management area, in a defect management area (DMA)during a finalizing of the recording medium.
 4. The method of claim 3,wherein the lastly recorded temporary management information is recordedin the DMA in at least one of a lead-in area and a lead-out area of therecording medium.
 5. The method of claim 1, wherein state informationregarding the defective area is recorded in the replacement area.
 6. Themethod of claim 5, wherein the position information and stateinformation are ECC encoded along with an ECC encoding of data to berecorded in the replacement area.
 7. The method of claim 5, wherein theposition information and state information and ECC encoded data arerecorded in the replacement area.
 8. The method of claim 1, wherein therecording of the temporary defect management information is performedwhenever the recording with respect to the replacement area or recordingwith respect to multiple replacement areas is performed.
 9. The methodof claim 1, wherein the recording with respect to the replacement area,or recording with respect to multiple replacement areas, represents arecording operation, and the recording of the temporary defectmanagement information is performed every recording operation.
 10. Acomputer-readable medium comprising computer readable code forcontrolling a reproducing and/or recording apparatus to perform themethod of claim
 1. 11. A method of managing a defect in a recordingmedium, comprising: determining whether defect management of therecording medium has been successfully completed; in response to thedefect management of the recording medium determined to have not beensuccessfully completed, reading information regarding a defective areaof the recording medium from a replacement area of the recording medium;and generating defect information of the recording medium based on theinformation from the replacement area.
 12. The method of claim 11,wherein the generating of the defect information comprises generatingtemporary defect information of the recording medium based on theinformation from the replacement area.
 13. The method of claim 12,wherein the generating of the temporary defect information comprisesgenerating new temporary defect information of the recording mediumbased on lastly recorded temporary defect information of the recordingmedium and the defect list.
 14. The method of claim 11, furthercomprising updating defect management information in a defect managementarea of the recording medium based on the information from thereplacement area.
 15. The method of claim 11, further comprisinggenerating a defect list based on the information of the replacementarea, wherein the generating of the defect information comprisesgenerating the defect information based on previous defect informationof the recording medium and the defect list.
 16. The method of claim 11,wherein the determining of whether the defect management wassuccessfully completed is determined by checking a consistency flag onthe recording medium.
 17. The method of claim 11, wherein the reading ofthe information from the replacement area comprises reading positioninformation regarding the defective area from the replacement area. 18.The method of claim 11, wherein the recording of the information of thereplacement area comprises reading position information and stateinformation regarding the defective area from the replacement area. 19.A computer-readable medium comprising computer readable code forcontrolling a reproducing and/or recording apparatus to perform themethod of claim
 11. 20. A method of managing a defect in a recordingmedium, comprising: determining whether defect management of therecording medium has been previously successfully completed; scanning aportion of the recording medium purportedly containing no recorded data,as identified in a spare bit map (SBM), and verifying whether theportion contains no recorded data; and updating the SBM to reflect arecording state of the recording medium based on the verification of theportion of the recording medium.
 21. The method of claim 20, wherein theupdating of the SBM further comprises recording an updated SBM astemporary management information in a temporary defect management areaof the recording medium.
 22. A computer-readable medium comprisingcomputer readable code for controlling a reproducing and/or recordingapparatus to perform the method of claim
 20. 23. A method of rebuildingtemporary defect information of a recording medium, the methodcomprising: reading information regarding a defective area of therecording medium from a replacement area of the recording medium, thereplacement area including position information regarding the defectivearea; and generating temporary defect information based on previoustemporary defect information of the recording medium and the informationof the replacement area of the recording medium.
 24. The method of claim23, further comprising generating a defect list based on the informationof the replacement area, wherein the generating of the temporary defectinformation comprises generating the temporary defect information basedon the previous temporary defect information and the defect list.
 25. Acomputer-readable medium comprising computer readable code forcontrolling a reproducing and/or recording apparatus to perform themethod of claim 23.